
import requests
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36',
    'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
}
# url
gamed = 'https://apps.game.qq.com/lol/match/apis/searchBMatchInfo_bak.php?p8=5&p1=148&p4=3&p9=&p10=&p6=2&p11=&p12=&page=1&pagesize=100'
url = 'https://apps.game.qq.com/lol/match/apis/searchBMatchInfo_bak.php?p8=5&p1=148&p4=1&p9=&p10=&p6=3&p11=&p12=&page=1&pagesize=100'

# 结束的
t = requests.get(url=gamed, headers=headers)  # 请求网址
t.encoding = 'gbk'
text = t.text
game = eval(text)
# print(game['msg']['result'])
# print(len(game['msg']['result']))
for item in game['msg']['result']:
    print(item['GameTypeName'] + " " + item['bMatchName'] + " " + item['ScoreA'] + ":" + item['ScoreB'] +  " " + item['MatchDate'])

# 未开始的
t = requests.get(url=url, headers=headers)  # 请求网址
t.encoding = 'gbk'
text = t.text
game = eval(text)
for item in game['msg']['result']:
    print(item['GameTypeName'] + " " + item['bMatchName'] + " " + item['MatchDate'])
    print(item['MatchDate'][0:4])
    print(item['MatchDate'][5:7])
    print(item['MatchDate'][8:10])
    print(item['MatchDate'][11:13])
    print(item['MatchDate'][14:16])
    print(item['MatchDate'][17:19])